home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / windows5 / wck30h.zip / WCMAKE.EXE / DDE.TXT < prev    next >
Text File  |  1991-10-31  |  19KB  |  563 lines

  1.           
  2.           WinCheck 3.0  DDE Tech Notes
  3. Version 3.0h  10/24/91  ⌐ 1991 Wilson WindowWare, Inc
  4.  
  5. This document is separated into three sections:
  6.  
  7.   DDE Commands to Request WinCheck Information
  8.   DDE Commands to Enter or Change WinCheck information
  9.   The WinCheck DDE SDK
  10.  
  11.  
  12.           
  13.           DDE Commands to Request WinCheck Information
  14.           ============================================
  15.           
  16. These commands are sent to WinCheck with the DDE Request convention.
  17.  
  18. GETEARLIESTUNCLEARED
  19.  
  20.   Description:
  21.   GETEARLIESTUNCLEARED will place the following ASCII string into
  22.   your return area:
  23.       M:mm,Y:yy
  24.  
  25. GETREG
  26. GETREGLITE
  27.  
  28.   Description:
  29.   GETREG and GETREGLITE will get the information from a WinCheck 
  30.   Register, and place it into a tabbed ASCII file. GETREG returns 
  31.   all information about each transaction (payee, amount, category/split
  32.   information, memo information, address, and tax/cleared status).
  33.   GETREGLITE does not return category information, memo lines, or
  34.   addresses.  GETREGLITE is substantially faster than GETREG.
  35.   Certain filters can also be applied:
  36.   
  37.      M=mm                  Specify Month.
  38.      Y=yy                  Specify Year
  39.      F=All                 Show all (no filter, default)
  40.      F=Cleared             Show Cleared
  41.      F=Uncleared           Show Uncleared
  42.      F=Credit              Show Credit
  43.      F=Debit               Show Debit
  44.  
  45.   Example Usage's in Word for Windows:
  46.   
  47.   To get the entire register for the current month in WinCheck, Account TUT:
  48.       {dde WinCheck TUT GetReg}
  49.       
  50.   To get the May 91 Register without memos or categories:
  51.       {dde WinCheck TUT GetRegLite,m=05,y=91}
  52.       
  53.   To get the May 91 Register, cleared transactions only:
  54.       {dde WinCheck TUT GetReg,m=05,y=91,f=cleared}
  55.       
  56.   To get the May 91 Register, cleared debits only:
  57.       {dde WinCheck TUT GetReg,m=05,y=91,f=cleared,f=debit}
  58.   
  59.   Format of Output
  60.   The output from GETREG will be a tabbed ASCII file.  Each tab 
  61.   represents a column.  Each transaction will have 16 columns. If
  62.   the transaction is split amongst categories, then each split will 
  63.   be displayed on subsequent lines. GETREGLITE does not use columns 8-16.
  64.   
  65.   Column    Description                      Example
  66.  
  67.   1         Account ID                       TUT
  68.   2         Unique Record                    12
  69.             Number for that month
  70.   3         Transaction Type                 300
  71.             (see Table at end)
  72.   4         Date                             03/10/91
  73.   5         Check # (if any).                203
  74.             Blank if not a check
  75.   6         Payee/Description                Safeway
  76.   7         Transaction amount.              -67.73
  77.             Debits will have a
  78.             negative sign.
  79.   8         Category/Subcategory.             Personal:Food
  80.             SPLIT if split.
  81.   9         Tax significant.                  T
  82.             A "T" indicates tax
  83.             significance, a blank
  84.             indicates otherwise.
  85.   10        Transaction Cleared status        C
  86.             A "C" indicates the
  87.             transaction is cleared, a
  88.             blank indicates otherwise.
  89.   11        "To" line in Address              Seafirst Bank Co         
  90.   12        Address                           123 Main Street
  91.   13        City, State                       Seattle, WA
  92.   14        Zip code                          98000
  93.   15        Memo 1                            Groceries
  94.   16        Memo 2                            Party food
  95.   
  96.   The subsequent lines for a split transaction have the following format:
  97.   
  98.   Column    Description                     Example
  99.   
  100.   1         Split Number. Always in         #1
  101.             numerical order with a 
  102.             pound sign.
  103.   2         Split amount                    -23.43
  104.   3         Category/Subcategory            Personal:Hobbies
  105.             
  106.   
  107.   Example Output
  108.   
  109.  TUT0 100 03/04/91        Checking Deposit   2783.93 Royalty   T  C
  110.  TUT1 300 03/05/91  3336  George Kilroy        -9.50 Personal:Newspaper T
  111.  TUT2 300 03/05/91  3337  Seattle City Light -187.45 Utilities T  C
  112.  TUT3 300 03/05/91  3338  U.S. West           -65.47 SPLIT     T #1 -35.34 
  113.  Utilities:Home Phone #2 -30.13 Utilities:Celluar Phone
  114.  TUT4 300 03/05/91  3339  Cellular One       -114.68 Utilities T
  115.  
  116.  
  117. GETCATEGORIES
  118. GETCATEGORIESSORTED
  119.  
  120.   Description:
  121.   GETCATEGORIES and GETCATEGORIESSORTED will get the list of categories
  122.   and subcategories from WinCheck, and place it into an ASCII file.  
  123.   GETCATEGORIES is significantly faster than GETCATEGORIESSORTED.
  124.   
  125.   Example Usage in WinWord
  126.     {dde WinCheck TUT GetCategories}
  127.     {dde WinCheck TUT GetCategoriesSorted}
  128.  
  129.   Format of Output
  130.   There is one category per line.
  131.   
  132.   Example Output (sorted)
  133.    Band Income
  134.    Car Pymt
  135.    Computer
  136.    Credit Cards
  137.    Credit Cards:Gas
  138.    Garden Svc
  139.    Model Fees
  140.    Mortgage
  141.    Personal
  142.    Personal:Food
  143.    Personal:Hobbies
  144.    Personal:Magazines
  145.    Personal:Newspaper
  146.    Royalty
  147.    Utilities
  148.    Utilities:Celluar Phone
  149.    Utilities:Home Phone
  150.  
  151. GETCURDATE
  152.   Description:
  153.   GETCURDATE will return the current date.
  154.   
  155. GETCHECKING
  156. GETSAVINGS
  157. GETBNKCHECKING
  158. GETBNKSAVINGS
  159.   
  160.   Description:
  161.   These four commands will return the current balance for checking and
  162.   savings accounts, for either Your balance or the Bank's balance.
  163.   
  164. GETCOMMON
  165.  
  166.   Description:
  167.   GETCOMMON will get a list of the common transactions defined in WinCheck.
  168.   Certain filters can also be applied:
  169.   
  170.      R=All          Show all Dates Common (default)
  171.      R=ll-hh        Show Commons between ll and hh days
  172.      F=All          Show both cleared and uncleared
  173.      F=Cleared      Show Cleared
  174.      F=Uncleared    Show Uncleared
  175.   
  176.   Example Fields in Word for Windows
  177.   ==================================
  178.   To get all of the Common Transactions:
  179.       {dde WinCheck TUT GetCommon}
  180.   
  181.   To get all of the Common Transactions that are debits:
  182.       {dde WinCheck TUT GetCommon,f=debit}
  183.   
  184.   To get all of the Common Transactions that happen from the 1st to the
  185.   15th of the month:
  186.       {dde WinCheck TUT GetCommon,r=1-15}
  187.   
  188.   Gets all Common Transactions that happen from the 1st to the 15th
  189.   of the month, and credit the account:
  190.       {dde WinCheck TUT GetCommon,r=1-15,f=credit}
  191.      
  192.   Format of Output
  193.   
  194.    There is one common transaction per line.  Each tab represents a
  195.    column. There are four columns:
  196.    
  197.    Column    Description                    Example
  198.  
  199.    1         Transaction Properties         MP,R
  200.    2         Day of month                   04
  201.    3         Payee                          Seattle City Light
  202.    4         Amount                         -9.50
  203.    
  204.   
  205.   Example Output
  206.   
  207.    A       03      Checking Deposit             +2783.93
  208.    MP      04      George Kilroy                   -9.50
  209.    M       08      Seattle City Light              -0.00
  210.    M       08      U.S. West Communications        -0.00
  211.    M       08      Cellular One                    -0.00
  212.    MPP,R   08      Wells Fargo Mortgage Co       -2245.85
  213.    M       08      Smith Lawn and Garden Care     -145.56
  214.    M       11      Checking Deposit              +3100.00
  215.  
  216.   
  217.           
  218.           DDE Commands to Enter or Change WinCheck Information
  219.           ====================================================
  220.   
  221. These commands are sent to WinCheck with the DDE Execute convention.
  222.  
  223. WRITECHECK
  224.  
  225.   Description:
  226.   WRITECHECK will enter a check into WinCheck's register. There are a 
  227.   number or parameters that can be filled in:
  228.   
  229.    Syntax          Description               Example
  230.    
  231.    D=mm/dd/yy      Specify Date              D=03/09/91
  232.    T=dddd.cc       Specify Amt               T=45.84
  233.    C=X             Specify Cleared           C=Y
  234.    N=###           Specify check number      N=2342
  235.    P="ppppppp"     Specify Payee             P="Seattle City Light"
  236.    M="mmmmm"       Specify Memo1             M="Groceries"
  237.    M2="mmmmm"      Specify Memo2             M2="Party Food"
  238.    L="ccccc:ssss"  Specify Category          L="Personal:Groceries"
  239.    $T=n*ddd.cc     Specify Split #n amount   $T=1*34.56
  240.                    (max 32)
  241.    $L=n*"ddd.cc"   Specify Split #n category $L=1*"Utilities:Home Phone"
  242.                    (max 32)
  243.    TO="ttt"        "To" part of Address      TO="Seattle City Light"
  244.    ADDR="sss"      Street Address            ADDR="123 Main Street"
  245.    CITY="ccc"      City                      CITY="Seattle"
  246.    STATE=ss        State                     STATE=WA
  247.    ZIP=zzzz        Zip                       ZIP=98004
  248.    PRINT           Prints this check         PRINT
  249.                   
  250.   
  251.   Examples
  252.   
  253.   To make WinCheck write a check for 580.00 to Shorewood Apartments,
  254.   category Rent, using the current date, and the current check #:
  255.   
  256.       [WriteCheck:p="Shorewood
  257.       Apartments",t=580.00,l="Rent"]
  258.  
  259.   To make WinCheck write a check for 580.00 to Shorewood Apartments,
  260.   category Rent, using the current date, and current check #, and print it:
  261.   
  262.       [WriteCheck:p="Shorewood
  263.       Apartments",t=580.00,l=Rent,print]
  264.   
  265.   To make WinCheck write a check to US West for 65.47, split two ways,
  266.   35.34 for Home Phone, and 30.13 for the cellular phone (the line 
  267.   breaks are for cosmetic reasons only):
  268.   
  269.       [WriteCheck:p="US West",T=65.47,
  270.       $T=1*35.34,$L=1*"Utilities:Home Phone",
  271.       $T=2*30.13,$L=2*"Utilities:Cellular Phone"]
  272.  
  273. CDEPOSIT
  274. SDEPOSIT
  275.  
  276.   Description:
  277.   CDEPOSIT and SDEPOSIT are used the same way as WRITECHECK. CDEPOSIT 
  278.   will make a checking deposit, and SDEPOSIT will make a savings deposit.
  279.   
  280.   Examples
  281.   To make WinCheck make a deposit for 1000, split across "Band Income" 
  282.   and "Payroll", on May 15, 1991:
  283.   
  284.       [CDeposit:t=1000.00,
  285.       $T=1*450.00,$L=1*"Band Income",
  286.       $T=2*550.00,$L=2*"Payroll",D=05/15/91]
  287.  
  288. CMISC
  289. SMISC
  290.  
  291.   Description:
  292.   CMISC and SMISC allow you to make up your own transaction. Use the
  293.   same parameters as WRITECHECK, but add the following:
  294.   
  295.    Syntax         Description                  Example
  296.    
  297.    DESC="ddd"     Specify Description          DESC="Service Fees"
  298.    T=dddd.cc      Specify Amt                  T=45.84
  299.    CR             Specify this transaction     CR
  300.                   credits your account
  301.   
  302.   Examples
  303.   To make WinCheck enter Service Fees for 6.50 on June 12, 1991.
  304.       [CMisc:t=6.50,Desc="Service Fees",D=06/12/91]
  305.  
  306. MODIFY
  307. MODIFYNR
  308.  
  309.   Description:
  310.   MODIFY and MODIFYNR can be used to change certain properties about a
  311.   transaction. These properties are:
  312.   
  313.      Transaction Amount
  314.      Cleared/Uncleared Status
  315.      Payee
  316.      Check Number
  317.   
  318.   MODIFYNR will not cause a screen refresh or recalc afterwards. This is 
  319.   helpful if you are modifying a large group of transactions at once 
  320.   because the refresh is a slow process. You should use the RECALC command
  321.   (explained elsewhere in this text).
  322.   
  323.   In order to modify a transaction, you must have the month, year, 
  324.   and the unique record number of the transaction. The GETREG or 
  325.   GETREGLITE functions can give you this information.
  326.   
  327.   When modifying a transaction, specify the date and the record number
  328.   with the following parameters:
  329.   
  330.    Syntax         Description               Example
  331.    
  332.    D=mm/dd/yy     Specify Description       D=03/12/91
  333.                  
  334.    R=nn           Specify number            R=7
  335.   
  336.   Example
  337.   Consider the following output from GETREGLITE:
  338.   
  339.   TUT0   100        03/04/91           Checking  Deposit   2783.93   C
  340.   TUT1   300        03/05/91    3336   George Kilroy         -9.50
  341.   TUT2   300        03/05/91    3337   Seattle City Light  -187.45
  342.   TUT3   300        03/05/91    3338   U.S. West            -65.47
  343.   TUT4   300        03/05/91    3339   Cellular One        -114.68
  344.   TUT5   300        03/05/91    3340   Wells Fargo Co     -2245.85
  345.   
  346.   If we want to clear the check to Seattle City Light (Unique Number 2),
  347.   we would use the following command (notice how only the month and year
  348.   need to be correct):
  349.   
  350.       [Modify:d=03/01/91,r=2,C=Y]
  351.   
  352.   Important:  If you change the amount of a transaction which is split,
  353.   the category will be set back to "Personal".
  354.  
  355. RECALC
  356.   
  357.   Description:
  358.   RECALC will cause a screen refresh and recalculation of WinCheck's
  359.   data from a specified date.
  360.   
  361.   Example
  362.   This command will recalc/refresh all data that is greater than or
  363.   equal to March 1, 1991:
  364.   
  365.       [Recalc:D=03/01/91]
  366.   
  367.   
  368. REGISTERADDON
  369.   
  370.   Description:
  371.   A third party add-on tool can add itself to WinCheck's  Menu by using
  372.   the REGISTERADDON command.  The following parameters are used:
  373.   
  374.    Syntax         Description          Example
  375.    E="eee"        Executable Name      E="PAYROLL.EXE"
  376.                   
  377.    D="ddd"        Menu Descriptor      D="Payroll Deposit..."
  378.                   
  379.    S="sss"        Status Line Text     S="Make a Payroll Deposit"
  380.                             
  381.    C="ccc"        Caption of your app  C="Payroll Deposit"
  382.                   
  383.   
  384.   Example
  385.   To register the Payroll Deposit Application that is supplied with 
  386.   WinCheck, Payroll issues the following command:
  387.   
  388.   [REGISTERADDON:E="PAYROLL.EXE",D="Payroll Deposit...",
  389.       S="Make a Payroll Desposit",C="Payrol Deposit"]
  390.   
  391.   Please see the section on the DDE SDK for the guidelines
  392.   for WinCheck add-on tools.
  393.   
  394.   
  395.           
  396.           The WinCheck DDE SDK
  397.           ====================
  398.   
  399.   This section is divided into 7 different chapters:
  400.   
  401.     What is an Add-On Tool?
  402.     What is Registering?
  403.     Command line parameters
  404.     WWWDDEC.DLL
  405.     Using Visual Basic to write your tool
  406.     Using the Windows SDK to write your tool
  407.     Distributing your tool to the masses
  408.   
  409. What is an Add-On Tool?
  410. =======================  
  411.   WinCheck Add-On tools are separate programs that use DDE to manipulate
  412.   or examine WinCheck data.  WinCheck can add these programs to its menu
  413.   to shield the End User of the fact that they are really running a 
  414.   separate program. The End User will think that your add-on tool is just
  415.   a built-in part of WinCheck.
  416.   
  417. What is Registering?
  418. ====================  
  419.   Registering an app with WinCheck informs WinCheck of what to put on
  420.   its menu, status line, and where the Add-On tool exists on the End 
  421.   User's machine.
  422.   
  423.   When an End User first receives your tool, they will need to add it
  424.   with the "Add..." menu choice in WinCheck's "Tools" menu. When they do
  425.   this, WinCheck will execute your add-on tool, with the /R:xxx switch 
  426.   (see next chapter).  Your application then must use the REGISTERADDON
  427.   execute command to acknowledge WinCheck's attempt to add on the tool.
  428.   
  429.   Once your application has registered itself, there is no need to 
  430.   register itself again.
  431.   
  432. Command line parameters
  433. =======================
  434.   
  435.   There are three types of interaction WinCheck has with your tool, two
  436.   involve executing it:
  437.   
  438.   1. The End User adds it with the "Add..." menu option. WinCheck will 
  439.      then run your application with the /R:xxx command line switch. 
  440.      "xxx" is the current account ID, which is used for the topic in DDE
  441.      conversations. For Example:
  442.      
  443.      PAYROLL.EXE /R:TUT
  444.      
  445.      Your application should respond to this switch with the
  446.      REGISTERADDON command.
  447.   
  448.   2. The End User selects your tool from the Menu, and your tool is not
  449.      already running.  WinCheck will then run your application with the
  450.      /L:xxx command line switch. "xxx" is the current account ID, which 
  451.      is used for the topic in DDE conversations.  For Example:
  452.      
  453.      PAYROLL.EXE /R:TUT
  454.      
  455.      Your application need not respond to this switch, it merely should
  456.      use TUT (in this example) for the Topic.
  457.   
  458.   3. The End User selects your tools from the Menu, and it is already 
  459.      running.  WinCheck will then bring your tool to the Top 
  460.      (WinSDK call ShowWindow (hWndApp, SW_SHOW)).
  461.      
  462. WWWDDEC.DLL
  463.   
  464.   WWWDDEC.DLL is a DLL included with WinCheck.  It allows an application
  465.   to become a DDE Client without having to write any DDE code.  The 
  466.   exported function from this DLL is:
  467.   
  468.   WORD FAR PASCAL WWWDDERun ( szCommand, iAction, szReturn, hWnd )
  469.   
  470.   szCommand   LPSTR.  Points to the DDE comand string.
  471.   iAction     int.  Has one of three values:
  472.                
  473.                0: Parse command only (for debugging)
  474.                1: Run the command only
  475.                2: Parse and Run the command (for debugging)
  476.                
  477.   szReturn    LPSTR. Points to an application supplied buffer for 
  478.               DDE_REQUEST return data.
  479.              
  480.   hWnd        HWND. Handle to a top-level window of your application.
  481.   
  482.   The Command Syntax is:
  483.   
  484.   =<c> <App> <topic> <text>
  485.   
  486.   <c>     Can be one of the folowing values:
  487.            
  488.            e    Execute
  489.            r    Request
  490.            p    Poke
  491.   
  492.   <App>   Application Name
  493.   
  494.   <Topic> Application Topic
  495.   
  496.   <Text>  Text of command
  497.   
  498.   
  499.   For example, to do a GetReg from WinCheck, you could call WWWDDERun
  500.   as in the following example:
  501.   
  502.   WWWDDERun ("=r WinCheck TUT GetReg", 1, szReturnData, hWndParent );
  503.   
  504.   This will return the register in the szReturnData memory block.
  505.   
  506.   To register Payroll with WinCheck, it does this:
  507.   
  508.   WWWDDERun (
  509.           "=e WinCheck TUT [RegisterAddOn:"
  510.           "e=\"Payroll.exe\","
  511.           "d=\"Payroll...\","
  512.           "s=\"Make a Payroll Deposit\","
  513.           "c=\"Payroll Deposit\"]",
  514.           1,
  515.           NULL,
  516.           hWndParent );
  517.           
  518. Using Visual Basic to write your tool
  519. =====================================  
  520.  The source code to the Payroll program written in Visual Basic can be
  521.  found on your WinCheck distribution disk. Visual Basic has its own DDE
  522.  commands, so WWWDDERun is not used.
  523.   
  524. Using the Windows SDK to write your tool
  525. ========================================
  526.   
  527.  The source code to the Payroll program written in the Windows SDK 
  528.  and Microsoft C can be found on your WinCheck distribution disk.  
  529.  It makes use of the WWWDDERun command.
  530.   
  531. Distributing your tool to the masses
  532. ====================================
  533.   
  534. Once you have written your tool, there are a number of possibilities:
  535.   
  536.   You can keep it to yourself
  537.   You can sell it as shareware/retail (like WinCheck)
  538.   You can upload it to our Forum on Compuserve for everyone to share
  539.   You can send it to Wilson WindowWare. If it is really cool, we will
  540.    put it in the next release of WinCheck and give you credit for 
  541.    writing it.
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548. Table of Transaction Types:
  549. ---------------------------
  550. Checking Deposit        100
  551. Endstub Check           200
  552. Normal Check            300
  553. Checking ATM            301
  554. Checking MISC           302
  555. Checking Interest       303
  556. Checking Credit/Debit   304
  557. Savings Deposit         320
  558. Savings Withdrawal      321
  559. Savings ATM             322
  560. Savings Misc            323
  561. Savings INterest        324
  562. Savings Credit/Debit    325
  563.